TK!2
=v
#1
:n

:s
b
:c
 Definite Integral of a Polynomial 
#3
:n
pc
:v
'abc
:s
i
:c
list with polynomial coefficients
#4
:n
p
:v
-1
:s
i
:c
lower limit
#5
:n
q
:v
1
:s
i
:c
upper limit
#6
:n
F
:v
10.4
:s
o
:c
definite integral
=u
=l
#1
:n
abc
:v
1
-2
-9
2
8
E
#2
:n
x
:v
-2.5
-2.25
-2
-1.75
-1.5
-1.25
-1
-.75
-.5
-.25
0
.25
.5
.75
1
1.25
1.5
1.75
2
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
4.5
E
#3
:n
y
:v
17.0625
6.34765625
0
-2.96484375
-3.4375
-2.21484375
0
2.59765625
5.0625
6.97265625
8
7.91015625
6.5625
3.91015625
0
-5.02734375
-10.9375
-17.40234375
-24
-30.21484375
-35.4375
-38.96484375
-40
-37.65234375
-30.9375
-18.77734375
0
26.66015625
62.5625
E
=f
#1
:n
dfnipoly
:c
Definite integral of a polynomial function
:t
Procedure
:i
x1,x2,coeff
:o
z
#1
:n
dfnipoly
:z
" This procedure evaluates the definite integral of a polynomial function 
" defined by a list of coefficients "coeff" (in descending order) and lower
" and upper limits "x1" and "x2".

call blank('aux)
n:= length(coeff)
n1:= n + 1
for i=1 to n-1
   'aux[i]:= coeff[i]/(n1-i)
next i
'aux[n]:= coeff[n]
'aux[n1]:= 0
z:= poly(x2,'aux) - poly(x1,'aux)
call delete('aux)
/E
E
=r
#1
:r
F = dfnipoly(p,q,pc)
#3
:r
"  This model shows the use of the function "dfnipoly" for evaluating 
:s
C
#4
:r
"   definite integrals of polynomial functions. 
:s
C
#5
:r
"  Press F7 to see the graph of the function y=poly(x,'abc).  The above
:s
C
#6
:r
"   result shows the area of the middle "bump" above the x-axis.
:s
C
#7
:r
"  The function is not invertible.  How to find out, say, the value of the
:s
C
#8
:r
"   lower limit "p" that would make the area exactly 10?  You assign  10  as
:s
C
#9
:r
"   an input value of "F", make "p" a guess with a value of  0, and solve.
:s
C
=p
#1
:n
Poly
:t
Line chart
:d
EGA
:i
"y  =  x^4 - 2*x^3 - 9*x^2 + 2*x + 8"
:s
Yes
:z
X-axis
:g
No
:l
None
:h
"x"
:v
"y"
:x
x
:u
#1
:y
y
:f
1
:e
28
:p
Lines
:c
"*"
E
=t
=n
=g
#1
:c
.000001
:i
10
:v
Yes
:l
60
:f
66
:m
0
:w
80
:b
No
:a
Yes
:r
Yes
:h
No
:t
1
:n
No
:d
LPT1
%Tv,f,0,5,0,1,0
%Or,f,0,1,0,1,0
